package com.mano.mall.web.pay.feign;

import com.alibaba.fastjson.JSONObject;
import com.mano.mall.api.pay.PayContextService;
import com.mano.mall.common.base.BaseApiService;
import com.mano.mall.common.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

@FeignClient(value = "mano-mall-pay",fallback = PayContextFeignCallBack.class)
public interface PayContextFeign extends PayContextService {

}

@Component
class PayContextFeignCallBack extends BaseApiService implements PayContextFeign{
    @Override
    public BaseResponse<JSONObject> toPayHtml(String channelId, String payToken) {
        return setResultError("服务器忙，请稍后重试");
    }
}